<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:replace="${title}">博客发布</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../../static/css/home.min.css" th:href="@{/css/home.min.css}">
    <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.css" th:href="@{/lib/editormd/css/editormd.css}">
    <style>
        body{
            background: url("/images/bg.png");
        }

        .m-text{
            font-weight: 300 !important;
            letter-spacing: 1px !important;
            line-height: 1.5 !important;
            font-family: 宋体;
        }

        .m-black{
            color: #333 !important;
        }
    </style>
</head>
<body>
    <nav th:fragment="menu(n)" class="ui inverted segment stacked m-padding-smaller">
        <div class="ui container">
            <div class="ui inverted secondary stacked menu">
                <h2 class="ui teal header item">管理后台</h2>
                <a th:href="@{/admin/blogs}" class="item" th:classappend="${n==1} ? 'active'"><i class="mini home icon"></i> 博客</a>
                <a th:href="@{/admin/types}" class="item" th:classappend="${n==2} ? 'active'"><i class="mini idea icon"></i> 分类</a>
                <a th:href="@{/admin/tags}" class="item" th:classappend="${n==3} ? 'active'"><i class="mini tag icon"></i> 标签</a>
                <div class="right menu">
                    <div class="ui dropdown item">
                        <div class="text">
                            <img src="/images/green.jpg" th:src="@{/images/green.jpg}" class="ui avatar image" alt="" style="width: 30px; height: 30px">
                            刘军民
                        </div>
                        <i class="dropdown icon"></i>
                        <div class="menu">
                            <a class="item" th:href="@{/admin/logout}">注销</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </nav>

    <footer th:fragment="footer" class="ui inverted vertical segment m-padding-large">
        <div class="ui center aligned container">
            <div class="ui inverted divided grid">
                <div class="three wide column">
                    <div class="item">
                        <img src="/images/WeChat.png" th:src="@{/images/WeChat.png}" class="ui rounded image" alt="" style="width: 100px">
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header">最新博客</h4>
                    <div id="newblog-container">
                        <div class="ui inverted link list" th:fragment="newblogList">
                            <a href="#" class="item" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}" th:each="blog: ${newblogs}" th:text="${blog.title}">最新项目</a>
                        </div>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">Email:1792619448@qq.com</a>
                        <a href="#" class="item">QQ:1792619448</a>
                        <a href="https://github.com/liujunminx" class="item">GitHub-></a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header">关于博客</h4>
                    <div class="ui inverted link list">
                        <p class="m-text-thin m-text-spaced m-opacity-mini">这是我的个人博客，分享自己学习历程中的笔记，项目，感想，希望能和大家交流学习</p>
                    </div>
                </div>
            </div>
            <div class="ui inverted divider section"></div>
            <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright © 2019 Lemon Designed by Liu JunMin湘ICP备19021968</p>
        </div>
    </footer>

    <th:block th:fragment="script">
        <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
        <script src="/lib/editormd/editormd.min.js" th:src="@{/lib/editormd/editormd.min.js}"></script>
        <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
        <script th:inline="javascript">
            $(function () {
                $('#newblog-container').load(/*[[@{/footer/newblog}]]*/"/footer/newblog");
            });
        </script>
    </th:block>
</body>
</html>